install_plugins_pre_{$tab}
Action HookDescription
Fires before each tab on the Install Plugins screen is loaded. The dynamic portion of the hook name, `$tab`, allows for targeting individual tabs. Possible hook names include: - `install_plugins_pre_beta` - `install_plugins_pre_favorites` - `install_plugins_pre_featured` - `install_plugins_pre_plugin-information` - `install_plugins_pre_popular` - `install_plugins_pre_recommended` - `install_plugins_pre_search` - `install_plugins_pre_upload`Hook Information
File Location |
wp-admin/plugin-install.php
View on GitHub
|
Hook Type | Action |
Line Number | 82 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into install_plugins_pre_{$tab}
add_action('install_plugins_pre_{$tab}', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-admin/plugin-install.php:82
- How this hook is used in WordPress core
<?php
77 * - `install_plugins_pre_search`
78 * - `install_plugins_pre_upload`
79 *
80 * @since 2.7.0
81 */
82 do_action( "install_plugins_pre_{$tab}" );
83
84 /*
85 * Call the pre upload action on every non-upload plugin installation screen
86 * because the form is always displayed on these screens.
87 */
PHP Documentation
<?php
/**
* Fires before each tab on the Install Plugins screen is loaded.
*
* The dynamic portion of the hook name, `$tab`, allows for targeting
* individual tabs.
*
* Possible hook names include:
*
* - `install_plugins_pre_beta`
* - `install_plugins_pre_favorites`
* - `install_plugins_pre_featured`
* - `install_plugins_pre_plugin-information`
* - `install_plugins_pre_popular`
* - `install_plugins_pre_recommended`
* - `install_plugins_pre_search`
* - `install_plugins_pre_upload`
*
* @since 2.7.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-admin/plugin-install.php
Related Hooks
Related hooks will be displayed here in future updates.